#ifndef __GOFGAME_COMMON_UI_TYPED_INTENT_H__
#define __GOFGAME_COMMON_UI_TYPED_INTENT_H__

#include "gofgame/common/ui/Intent.h"
#include "gofgame/common/ui/Component.h"

namespace gofgame {
	namespace common {
		namespace ui {
			template <typename T>
			class TypedIntent : public Intent {
			public:
				virtual Ref<Component> createComponent() _override {
					Ref<T> component;
					component.initialize();
					component->init();
					return component;
				}
			};
		}
	}
}

#endif //__GOFGAME_COMMON_UI_TYPED_INTENT_H__